const router = require("express")();
const fm = require("../core/FileManager");
const um = require("../core/UserManager");
const dm = require("../core/DataManager");

router.all("/get/:p/:a", um.middle_finder, um.middle_loadUser, (req, res) => {
    let user = req.user || {};


    let params = req.params || {};
    let page = params.p || 0;
    let getAll = params.a === 'true';

    dm.getNotice(um.permissionCheck(getAll, user, 'see_private_notice'), page, DM_RES(res));
});

//模块导出
module.exports = router;